/* 
评论模块
 */
import request from "@/utils/request"
import store from "@/store"
/* 
发表删除评论
type: 数字,资源类型,对应歌曲,mv,专辑,歌单,电台,视频对应以下类型
0: 歌曲
1: mv
2: 歌单
3: 专辑
4: 电台
5: 视频
6: 动态
id:对应资源 id
content :要发送的内容
commentId :回复的评论 id (回复评论时必填)
 */
export const sendcommentAPI = (t, type, id, content, commentId) => {
  let cookie = store.state.usercookie
  return request({
    method: "GET",
    url: "/comment",
    params: {
      t,
      type,
      id,
      content,
      commentId,
      cookie,
    },
  })
}
//点赞评论
export const commentlikeAPI = (id, cid, t, type) => {
  let cookie = store.state.usercookie
  return request({
    method: "GET",
    url: "/comment/like",
    params: {
      id,
      cid,
      t,
      type,
      cookie,
      timestamp: Date.now(),
    },
  })
}
